package com.gy.smart.home.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.gy.smart.R;
import com.gy.smart.home.bean.DynamicListBean;

import java.util.List;

/**
 * 作者：gy on 17/1/4
 * 说明：政民互动征集调查
 */
public class InteractionSelectAdapter extends BaseAdapter {

    private Context context;
    private List<DynamicListBean> datas;

    public InteractionSelectAdapter(Context context,List<DynamicListBean> datas){
        this.context = context;
        this.datas = datas;
    }

    @Override
    public int getCount() {
        return datas.size();
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        convertView = View.inflate(context, R.layout.adapter_interaction_select,null);
        TextView tvTitle = (TextView) convertView.findViewById(R.id.adapter_interact_tv_title);
        tvTitle.setText(datas.get(position).title);
        return convertView;
    }
}
